const mongoose = require("mongoose");
const Excel = require("../models/excelModel");

exports.getExcelByGroup = async (req, res) => {
  console.log("lai 地址---");
  let group = req.params.id;
  try {
    const ExcelData = await Excel.find({ group: group });
    console.log("地址---", ExcelData);
    res.status(201).json({
      status: "success",
      data: ExcelData,
    });
  } catch (err) {
    console.log(err);
    res.status(404).json({
      status: true,
      err,
    });
  }
};
